import java.util.Scanner;

public class javaThreeForth {


    public static void main(String[] args) {
        int [] array = {1,2,4,7,5,45,44,66,88};
        if(findThreeodd(array)){
            System.out.println("有三个连续的奇数");
        }else {
            System.out.println("no");
        }
    }
    public static boolean findThreeodd(int [] a){
        for (int i = 0; i < a.length; i++) {
            int count = 0;
            for (int j = i; j < a.length-1; j++) {
                if(a[i]==a[j]){
                    count++;
                }
                if(count == 2){
                    return true;
                }
            }
        }
        return false;
    }

    public static void main2(String[] args) {
        int [] array = {1,2,1,1,2};
        mySearch(array);
        System.out.println( mySearch2(array)+" ");
    }
    public static int  mySearch2(int [] a){
        int count = 0;
        int temp = a[0];
        for (int i = 0; i < a.length; i++) {
            if (count ==0 ){
                temp = a[i];
            }
            if (temp == a[i]){
                count++;
            } else {
                count--;
            }

        }
        return temp;
    }
    public static void  mySearch(int [] a){
        for (int i = 0; i < a.length; i++) {
            int count = 1;
            for (int j = i; j < a.length; j++) {
                if(a[i] == a[j]){
                    count++;
                }
                if(count > a.length / 2){
                    System.out.println(a[i]);
                }
            }
        }
    }

    public static void main1(String[] args) {

        int[] array = new int[5];
        Scanner scanner = new Scanner(System.in);
        for (int i = 0; i < array.length; i++) {
            array[i] = scanner.nextInt();
        }
        int ret = search2(array);
        if (ret != 0) {
            System.out.println(ret);
        } else {
            System.out.println("没有只出现一次的数字");
        }
    }

    public static int search2(int[] a) {

        int flag = a[0];
        for (int i = 1; i < a.length; i++) {
            flag = flag ^ a[i];
        }
        return flag;
    }

}
